package com.hqyj.lyf.controller;

import com.hqyj.lyf.pojo.ExamPaper;
import com.hqyj.lyf.service.ExamPaperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

/**
 * @author Qiuluoer
 *  2022/5/30 14:14
 */
@Controller
@RequestMapping("/expa")
public class ExamPaperController {
    @Autowired
    ExamPaperService examPaperService;

    @RequestMapping("/addex")
    @ResponseBody
    public Map<String,Object> addExamPaper(ExamPaper examPaper, List<Integer> quIds){
        Map<String, Object> map = examPaperService.addExamPaper(examPaper, quIds);
        return map;
    }
    @RequestMapping("/byex")
    @ResponseBody
    public Map<String,Object> queryByExamPaper(ExamPaper examPaper){
        Map<String, Object> map = examPaperService.queryByExamPaper(examPaper);
        return map;
    }

    @RequestMapping("/quallex")
    @ResponseBody
    public Map<String,Object> queryAllExamPaper(){
        Map<String, Object> map = examPaperService.queryAllExamPaper();
        return map;
    }

    @RequestMapping("/delex")
    @ResponseBody
    public Map<String,Object> deleteExamPaper(List<Integer> examIds){
        Map<String, Object> map = examPaperService.deleteExamPaper(examIds);
        return map;
    }
}
